package com.usefullc.crawler.schedule;

import com.usefullc.crawler.domain.ActiveMainInstance;
import com.usefullc.crawler.selenium.CrawlerWebDriverBuilder3;
import com.usefullc.crawler.service.ActiveMainInstanceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author: Sampson
 * @date: 2022-01-17 09:59
 */
@Component
public class CrawlerSchedule {


    @Autowired
    CrawlerWebDriverBuilder3 crawlerWebDriverBuilder;

    @Autowired
    private ActiveMainInstanceService activeMainInstanceService;

//    @Scheduled(cron = "0 5 3 1 1,4,7,10 *")
    public void newToOriginTask(){

    }


    //    @Scheduled(cron = "0/10 * * * * *")
    public void monitor(){
        crawlerWebDriverBuilder.monitor();
    }

    //暂时注释掉，不做服务端处理，减少日志
//    @Scheduled(cron = "0/30 * * * * *")
    public void statActiveMainInstance(){
        activeMainInstanceService.statActiveMainInstance();
    }




}
